import java.awt.BorderLayout;
import java.awt.Button;
import java.awt.Frame;

public class BorderLayoutTest {

	public static void main(String[] args) {
		Frame frm = new Frame("Frame with Controls");

		frm.setLayout(new BorderLayout());

		Button[] btn = new Button[5];
		for (int i=0; i<5; i++)	{
			btn[i] = new Button("Button " + (i+1));
		}

		frm.add(btn[0], BorderLayout.CENTER);
		frm.add(btn[1], BorderLayout.EAST);
		frm.add(btn[2], BorderLayout.SOUTH);
		frm.add(btn[3], BorderLayout.WEST);
		frm.add(btn[4], BorderLayout.NORTH);

		frm.setBounds(100, 100, 300, 300);
		frm.setVisible(true);
	}
}
